//
//  MCGlobelConst.h
//  TLYL
//
//  Created by miaocai on 2017/6/1.
//  Copyright © 2017年 TLYL01. All rights reserved.
//

#import <Foundation/Foundation.h>

#define MC_BALLSELECRED_COLOR [UIColor colorWithRed:0 green:130/255.0 blue:210/255.0 alpha:1]
#define MC_BALLNORMAL_COLOR [UIColor colorWithRed:187/255.0 green:187/255.0 blue:187/255.0 alpha:1]
#define MC_FILTER_COLOR [UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1]
#define MC_ColorWithAlpha(r, g, b, a) [UIColor colorWithRed:(r) / 255.0 green:(g) / 255.0 blue:(b) / 255.0 alpha:a]
#define MC_SKYBLUE_COLOR RGB(54, 128, 211)
#define MC_SEPAETOR_COLOR RGB(182, 182, 182)

#define RGB(__r, __g, __b)  [UIColor colorWithRed:(1.0*(__r)/255)\
green:(1.0*(__g)/255)\
blue:(1.0*(__b)/255)\
alpha:1.0]
#define MC_REALVALUE(value)  ceil((value)/375.0f*[UIScreen mainScreen].bounds.size.width)
#define MerchantMaxRebate    @"MerchantMaxRebate"
#define MerchantMinRebate    @"MerchantMinRebate"
#define MerchantMode         @"MerchantMode_MerchantMode"
#define MerchantXRebate      @"MerchantXRebate"
#define McSelectedBetRebate  @"MCSELECTED_BETREBEATE"
#define MCActionYuanJiaoFen  @"MCAction_YuanJiaoFen"
#define MCActionMultiple     @"MCAction_Multiple"
#define MCRefreshMineDataUI  @"MCRefreshMineDataUI"
#define MCRed_Envelopes_IsOpen @"MCRed_Envelopes_IsOpen"
#define MCProxy_Level        @"MCProxy_Level"
#define MCRebate             @"MCRebate"
#define MCIsRegisterSub  @"MCIsRegisterSub"
#define MCQARebate       @"QARebate"
#define MCHandRebate     @"HandRebate"
#define MCQRebate        @"QRebate"
#define MCHandQRebate    @"HandQRebate"
#define MCIsChaseNumber  @"IsChaseNumber"
#define MCMinBetMoney    @"MinBetMoney"
#define MCMaxBetMultiple @"MaxBetMultiple"

// iPhone4S

#define IS_iPhone_4S ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

// iPhone5 iPhone5s iPhoneSE

#define IS_iPhone_5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

// iPhone6 7 8

#define IS_iPhone_6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? (CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) || CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size)) : NO)

// iPhone6plus  iPhone7plus iPhone8plus

#define IS_iPhone6_Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? (CGSizeEqualToSize(CGSizeMake(1125, 2001), [[UIScreen mainScreen] currentMode].size) || CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size)) : NO)

// iPhoneX

#define IS_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)


#define G_SCREENWIDTH  ([UIScreen mainScreen].bounds.size.width)

#define G_SCREENHEIGHT ([UIScreen mainScreen].bounds.size.height)
//导航栏的高度kIs_iPhoneX
#define kStatusBarAndNavigationBarHeight (kIs_iPhoneX ? 88.f : 64.f)
//导航栏的高度kIs_iPhoneX
#define kTabBarHeight (kIs_iPhoneX ? 83.f : 49.f)
//kIs_iPhoneX
#define kIs_iPhoneX (G_SCREENWIDTH == 375.f && G_SCREENHEIGHT == 812.f)
//导航栏的高度kIs_iPhoneX 差值
#define kStatusBarAndNavigationBarHeightDifference (kIs_iPhoneX ? 24.f : 0.f)
//主题色
#define MC_THEME_COLOR RGB(82, 80, 174)

#define MCTEST_BASE_API  @"http://026api.mc.corp/"

#define SEVERBASEURL [MCGlobelConst serverBaseURL]

#ifdef DEBUG //开发环境
#define testApi  @"testApi" // 修改api地址。 testApi时显示     改成其他隐藏
#define DEFAULTSEVERBASEURL @"http://026api.mc.corp/"

#elif BETA //预发环境
#define testApi  @"testApi1" // 修改api地址。 testApi时显示     改成其他隐藏
#define DEFAULTSEVERBASEURL @"https://ceshitestxlweburlxl.zzxx9.com/"

#else //正式环境
#define testApi  @"testApi1" // 修改api地址。 testApi时显示     改成其他隐藏
#define DEFAULTSEVERBASEURL @"https://mbappzxurlxl1.zzxx7.com/"

#endif

 //默认线路 比对跟那一条一样 就是谁 （swift 不支持宏定义的这种写法 默认线路只能这么做）
/**声明这个宏定义,主要是用于Masonry中的block中(防止循环引用)*/
#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;
// 弱引用
#define MHWeakSelf __weak typeof(self) weakSelf = self;
#pragma mark --------------------------
#pragma mark --------通知---------------
#pragma mark --------------------------
//HomePage
UIKIT_EXTERN NSNotificationName const NetworkIsReachabilityNotification __TVOS_PROHIBITED;
//HomePage
UIKIT_EXTERN NSNotificationName const HomePageDidLoadDefaultCatergeryListNSNotification __TVOS_PROHIBITED;
//PickViewController
UIKIT_EXTERN NSNotificationName const PickViewControllerChangeFooterHeightNSNotification __TVOS_PROHIBITED;
UIKIT_EXTERN NSNotificationName const PickViewControllerBallStatusChangedNSNotification __TVOS_PROHIBITED;
UIKIT_EXTERN NSNotificationName const PickViewControllerDanShiTextFieldEdtingNotification __TVOS_PROHIBITED;
//PickViewCell
UIKIT_EXTERN NSNotificationName const PickViewCellBallClickedNotification __TVOS_PROHIBITED;
UIKIT_EXTERN NSNotificationName const PickBaseViewControllerChangeErJiNotification __TVOS_PROHIBITED;
UIKIT_EXTERN NSNotificationName const MainNavigationGameRecordClickedNotification __TVOS_PROHIBITED;
#pragma mark --------------------------
#pragma mark --------配置项---------------
#pragma mark --------------------------

UIKIT_EXTERN NSString *tabbarThdSelected;// 客服显示的bug
UIKIT_EXTERN NSString *xianluaddr;
@interface MCGlobelConst : NSObject
+ (NSArray *)serverBaseURL;
@end
